home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kdeprint / kmmainview.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  3.6 KB  |  133 lines

  1. /*
  2.  *  This file is part of the KDE libraries
  3.  *  Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
  4.  *
  5.  *  This library is free software; you can redistribute it and/or
  6.  *  modify it under the terms of the GNU Library General Public
  7.  *  License version 2 as published by the Free Software Foundation.
  8.  *
  9.  *  This library is distributed in the hope that it will be useful,
  10.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.  *  Library General Public License for more details.
  13.  *
  14.  *  You should have received a copy of the GNU Library General Public License
  15.  *  along with this library; see the file COPYING.LIB.  If not, write to
  16.  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17.  *  Boston, MA 02110-1301, USA.
  18.  **/
  19.  
  20. #ifndef KMMAINVIEW_H
  21. #define KMMAINVIEW_H
  22.  
  23. #if !defined( _KDEPRINT_COMPILE ) && defined( __GNUC__ )
  24. #warning internal header, do not use except if you are a KDEPrint developer
  25. #endif
  26.  
  27. #include <qwidget.h>
  28. #include <kdeprint/kpreloadobject.h>
  29. #include <kmainwindow.h>
  30.  
  31. class KMManager;
  32. class KMPrinterView;
  33. class KMPrinter;
  34. class KMPages;
  35. class KActionCollection;
  36. class QPopupMenu;
  37. class QTimer;
  38. class QSplitter;
  39. class KToolBar;
  40. class KAction;
  41. class PluginComboBox;
  42. class QBoxLayout;
  43. class MessageWindow;
  44. class QMenuBar;
  45.  
  46. /**
  47.  * @internal
  48.  * This class is internal to KDEPrint and is not intended to be
  49.  * used outside it. Please do not make use of this header, except
  50.  * if you're a KDEPrint developer. The API might change in the
  51.  * future and binary compatibility might be broken.
  52.  */
  53. class KDEPRINT_EXPORT KMMainView : public QWidget, public KPReloadObject
  54. {
  55.     Q_OBJECT
  56. public:
  57.     KMMainView(QWidget *parent = 0, const char *name = 0, KActionCollection *coll = 0);
  58.     ~KMMainView();
  59.  
  60.     void setOrientation(int);
  61.     int orientation() const;
  62.     void setViewType(int);
  63.     int viewType() const;
  64.     void enableToolbar(bool on = true);
  65.     KAction* action(const char *name);
  66.     void showPrinterInfos(bool on);
  67.     bool printerInfosShown() const;
  68.  
  69. public slots:
  70.     void slotTimer();
  71.     void slotShowPrinterInfos(bool);
  72.     void slotChangePrinterState();
  73.     void slotRemove();
  74.     void slotConfigure();
  75.     void slotAdd();
  76.     void slotHardDefault();
  77.     void slotSoftDefault();
  78.     void slotTest();
  79.     void slotServerRestart();
  80.     void slotServerConfigure();
  81.     void slotManagerConfigure();
  82.     void slotAddSpecial();
  83.     void slotRefresh();
  84.     void slotToolSelected(int);
  85.     void slotToggleFilter(bool);
  86.     void slotHelp();
  87.  
  88. protected slots:
  89.     void slotPrinterSelected(const QString&);
  90.     void slotRightButtonClicked(const QString&, const QPoint&);
  91.     void slotToggleToolBar(bool);
  92.     void slotToggleMenuBar(bool);
  93.     void slotChangeView(int);
  94.     void slotChangeDirection(int);
  95.     void slotUpdatePossible( bool );
  96.     void slotInit();
  97.  
  98. protected:
  99.     void initActions();
  100.     void showErrorMsg(const QString& msg, bool usemgr = true);
  101.     void restoreSettings();
  102.     void saveSettings();
  103.     void loadParameters();
  104.     void reload();
  105.     void configChanged();
  106.     //void aboutToReload();
  107.     void loadPluginActions();
  108.     void removePluginActions();
  109.     void createMessageWindow( const QString&, int delay = 500 );
  110.     void destroyMessageWindow();
  111.     void reset( const QString& msg = QString::null, bool useDelay = true, bool holdTimer = true );
  112.  
  113. private:
  114.     KMPrinterView    *m_printerview;
  115.     KMPages        *m_printerpages;
  116.     QPopupMenu    *m_pop;
  117.     KActionCollection    *m_actions;
  118.     KMPrinter    *m_current;
  119.     KToolBar    *m_toolbar;
  120.     PluginComboBox    *m_plugin;
  121.     int        m_pactionsindex;
  122.     QStringList    m_toollist;
  123.     bool        m_first;
  124.     QBoxLayout    *m_boxlayout;
  125.     class KMainWindowPrivate;
  126.     KMainWindowPrivate *d;
  127.     KToolBar *m_menubar;
  128. };
  129.  
  130. KDEPRINT_EXPORT int kdeprint_management_add_printer_wizard( QWidget* parent );
  131.  
  132. #endif
  133.